#pragma once
#include "UIBase.h"
#include "../ui/FunctionBtn.h"

class BigMapUI : public UIBase
{
public:
	BigMapUI();
	~BigMapUI();
public:
	static cocos2d::Node* createNode();
	virtual bool init();
	CREATE_FUNC(BigMapUI);

	Node* m_selectedNode;
	vector<Sprite*> m_controlList;

	Sprite* m_closeBtn;
	Sprite* m_autoPath_btn;
	Sprite* m_random_btn;
	Sprite* m_move_btn;
	ui::ImageView* m_mapGround;
	int m_mapid;
	Sprite* m_mapSprite;
	Sprite* m_actorPoint;
	Sprite* m_markPoint;
	ui::Text* m_markX;
	ui::Text* m_markY;
	DrawNode* m_drawNode;
	ui::Text* m_mapName;
	
	int m_clickMapx;
	int m_clickMapy;
public:
	bool TouchDown(Touch* touch);
	void TouchMove(Touch* touch);
	bool TouchUp(Touch* touch);

	void Open();							//打开
	void Close();							//关闭
	void RefreshData();					//刷新界面数据
};